<template>
	<view>
		<u-popup :show="show" mode="center" round="16rpx" @close="close">
			<view class="text-center p-t-48 p-r-78 p-b-50 p-l-78 color-d">
				<view class="font-36 font-weight-500">客服热线</view>
				<view class="font-56 font-weight-500 m-t-30">{{phoneNumber}}</view>
				<view class="font-24 m-t-30">工作时间：周一至周日8:30-20:30</view>

				<view class="btn" @click="callPhone(phoneNumber)">拨打电话</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name: "service",
		data() {
			return {
				show: false,
				phoneNumber: ''
			}
		},
		mounted() {
			this.telephone()
		},
		methods: {
			close() {
				this.show = false;
			},
			open() {
				this.show = true;
			},
			// 客服电话
			async telephone() {
				const res = await this.$api.common.landlord('telephone')
				if (res.code === 200) {
					this.phoneNumber = res.data
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.btn {
		width: 200rpx;
		height: 80rpx;
		line-height: 80rpx;
		color: $c;
		background-color: $b;
		border-radius: 8rpx;
		margin: 62rpx auto 0;
	}
</style>
